package com.chhuang.huaao.service;

import java.util.List;

import com.chhuang.core.bean.QueryBean;
import com.chhuang.core.service.IBaseService;
import com.chhuang.huaao.bean.HaMachineQueryBean;
import com.chhuang.huaao.mapper.HaMachineMapper;
import com.chhuang.huaao.po.HaMachine;

/**
* HaMachine IService
* @author ChHuang
* @date Sun Apr 16 08:43:49 CST 2017
*/
public interface IHaMachineService extends IBaseService<HaMachineMapper, HaMachine> {
	/**
	 * 清空设备表中的指定客户编号
	 * @param customerId
	 */
	public void updateNullMachineCustomerIds(String customerId) throws Exception;
	
	/**
	 * 根据客户编号获取客户的设备
	 * @param customerId
	 * @return
	 */
	public List<HaMachine> findMachinesByCustomerId(String customerId) throws Exception;
	
	/**
	 * 根据多个主键删除多条设备记录
	 * @param machineIdList
	 * @throws Exception
	 */
	public void deleteByPrimaryKeys(List<String> machineIdList) throws Exception;

	/**
	 * 根据机器编号查找设备
	 * @param machineNum
	 * @return
	 * @throws Exception
	 */
	public HaMachine findMachineByMachineNum(String machineNum) throws Exception;
	
	/**
	 * 获取客户有权限管理的设备
	 * @param machineQueryBean
	 * @return
	 * @throws Exception
	 */
	public QueryBean<HaMachine> findMachineByCustomer(HaMachineQueryBean machineQueryBean) throws Exception;

	/**
	 * 获取的线的设备
	 * @throws Exception
	 */
	public List<HaMachine> findOnlineMachine() throws Exception;
	

	/**
	 * 获取离线的设备这里特指是的online状态是0的，不包括online状态为null的
	 * @throws Exception
	 */
	public List<HaMachine> findOutlineMachine() throws Exception;
}